package com.tulele.vtool.mapper;

import com.tulele.vtool.model.*;
import com.tulele.vtool.model.reqEntity.GetRecommendUserInfoReqBean;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component(value = "connectionInfoMapper")
public interface ConnectionInfoMapper {

    ConnectionPermissionInfo selectPermission(@Param("gzhCode") String gzhCode, @Param("vipStatus")Integer vipStatus);

    Integer selectApplyNumByUserId(@Param("userId")Integer userId);

    void sendApply(ConnectionApplyInfo connectionApplyInfo);

    List<ConnectionApplyInfo> selectPassesUserListByUserId(@Param("userId") Integer userId, @Param("req") GetRecommendUserInfoReqBean req,@Param("gzhCode")String gzhCode,@Param("screen") String[] screen);

    List<ConnectionApplyInfo> selectToUserListByUserId(@Param("userId")Integer userId, @Param("req")GetRecommendUserInfoReqBean req,@Param("gzhCode")String gzhCode,@Param("screen") String[] screen);

    Integer selectBeAddedNumByUserId(@Param("userId")Integer connectionToUserId);

    void deleteUserByConnectionId(@Param("connectionId") Integer connectionId);

    Integer selectPassesNumByUserId(@Param("userId")Integer userId);

    void passesUser(@Param("id")Integer id);

    Integer selectWhetherOrBeAdded(Integer userId);

    void switchState(@Param("userId") Integer userId, @Param("state") Integer state);

    void addWhetherOrBeAdded(WxNotifyMsgSetInfo wxNotifyMsgSetInfo);

    List<ConnectionApplyInfo> selectFromUserListByUserId(@Param("userId")Integer userId, @Param("req")GetRecommendUserInfoReqBean req,@Param("gzhCode")String gzhCode,@Param("screen") String[] screen);

    String selectRegionByUserId(Integer userId);

    Integer selectCountToUserListByUserId(@Param("userId")Integer userId, @Param("gzhCode")String gzhCode);

    Integer selectSendApplyId(@Param("userId")Integer userId, @Param("connectionToUserId")Integer connectionToUserId, @Param("gzhCode")String gzhCode);

    void updateApply(ConnectionApplyInfo connectionApplyInfo);

    List<ConnectionNeedInfo> selectYouAreListByGzhCode(String gzhCode);

    List<ConnectionNeedInfo> selectWouldYouListListByGzhCode(String gzhCode);

    Integer selectHaveBeenSet( ConnectionUserNeedInfo connectionUserNeedInfo);

    void updateStatus( ConnectionUserNeedInfo connectionUserNeedInfo);

    void setNeedByUserId(ConnectionUserNeedInfo connectionUserNeedInfo);

    List<ConnectionNeedInfo> selectNeedByUserId(@Param("userId")Integer userId, @Param("gzhCode")String gzhCode);

    List<String> selectIdentityNameByUserId(@Param("userId")Integer userId, @Param("gzhCode")String gzhCode);

    List<String> selectNeedNameByUserId(@Param("userId")Integer userId, @Param("gzhCode")String gzhCode);

    Integer selectNeedBeyond(@Param("needIds")List<Integer> needIds);

    String getUserAttentionArticleTypeInfo(Integer userId);

    ConnectionApplyInfo selectToUserIdByNeedId(Integer id);

    Integer isAdd(@Param("userId")Integer userId, @Param("platformUserId")Integer platformUserId);
}
